package com.zxy.supplier_system.server.repository

import com.zxy.supplier_system.server.entity.MarketInternalGoodsCode
import com.zxy.supplier_system.server.entity.SystemService
import org.springframework.data.jpa.repository.JpaRepository

interface MarketInternalGoodsCodeRepository : JpaRepository<MarketInternalGoodsCode, Int> {

    fun findByMarketIdAndMarket_SystemServiceOrderByCreatedDateTimeDesc(
        marketId: Int,
        systemService: SystemService
    ): List<MarketInternalGoodsCode>


    fun findByIdAndMarketIdAndMarket_SystemService(
        id: Int,
        marketId: Int,
        systemService: SystemService
    ): MarketInternalGoodsCode

    fun findByMarketIdAndMarket_SystemService(
        marketId: Int,
        systemService: SystemService
    ): List<MarketInternalGoodsCode>
}